<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>学生管理</title>
</head>

<link rel="shortcut icon" href="../../static/favicon.ico" th:href="@{/static/favicon.ico}">
<link href="../../static/css/bootstrap.min.css?v=3.3.6" th:href="@{/static/css/bootstrap.min.css}" rel="stylesheet">
<link href="../../static/css/font-awesome.css?v=4.4.0" th:href="@{/static/css/font-awesome.css}" rel="stylesheet">
<link href="../../static/css/plugins/bootstrap-table/bootstrap-table.min.css"
      th:href="@{/static/css/plugins/bootstrap-table/bootstrap-table.min.css}" rel="stylesheet">
<link href="../../static/css/animate.css" th:href="@{/static/css/animate.css}" rel="stylesheet">
<link href="../../static/css/style.css?v=4.1.0" th:href="@{/static/css/style.css}" rel="stylesheet">
<!-- Sweet Alert -->
<link href="../../static/css/plugins/sweetalert/sweetalert.css"
      th:href="@{/static/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
<!--simditor-->
<link rel="stylesheet" type="text/css" href="../../static/css/plugins/simditor/simditor.css"
      th:href="@{/static/css/plugins/simditor/simditor.css"/>
<style type="text/css">
    /*.col-md-2.text-center:hover {
        box-shadow: 10px 10px 5px #888888;
    }*/
    li {
        list-style: none;
    }

    #box a {
        text-decoration: none;
    }

    #box li {
        width: 163px;
        height: 65px;
        float: left;
        background: url(../../static/public/teaching/img/btn.png) no-repeat;
        position: relative;
    }

    #box img {
        position: absolute;
        left: 50%;
        bottom: 8px;
        z-index: 3;
        width: 0;
        margin-left: 0;
    }

    #box li a {
        width: 152px;
        height: 44px;
        padding-top: 8px;
        text-align: center;
        font-size: 14px;
        font-weight: bold;
        font-family: arial;
        color: #fff;
        line-height: 18px;
        position: absolute;
        top: 4px;
        left: 4px;
        z-index: 2;
    }

    #box li a span {
        color: #999;
        font-weight: normal;
        font-size: 12px;
    }

    #box .bg {
        width: 152px;
        height: 0;
        background: #2f4050;;
        position: absolute;
        left: 4px;
        top: 56px;
        z-index: 1;
        overflow: hidden;
    }

    .input_margin {
        margin-left: 20px;
    }

    .table > thead > tr > th {
        color: #2a62bc;
    }

    /*问题详情*/
    .ask-details-con {
        padding: 15px;
        border: 1px solid #e4e4e4;
        margin-top: 15px;
        background-color: #FFFFFF;
        height: 131px;
    }

    .form-inline .input-group > .form-control {
        width: auto;
    }

    .fa.fa-download {
        margin-top: 10px;
    }

    .simditor .simditor-body {
        /*设置高度*/
        min-height: 120px;
    }

    /*表格内容居中*/
    .table th, .table td {
        text-align: center;
        vertical-align: middle !important;
    }
</style>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox-title">
        <div class="row row-lg">
            <div class="col-sm-12">
                <div class="tab-pane">
                    <div class="panel-body">
                        <form class="form-inline">
                            <div class="form-group">
                                <h3>班级名称：Java全栈开发</h3>
                            </div>
                            <div class="ibox-tools">
                                <a href="teaching.html" class="btn btn-success" style="color: #FFFFFF">返回</a>
                            </div>
                            <hr style="margin-top: 4px;">
                        </form>
                    </div>
                </div>
                <div class="tabs-container">
                    <ul class="nav nav-tabs">
                        <li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true" id="message">基本信息</a>
                        </li>
                        <li class=""><a data-toggle="tab" href="#tab-2" aria-expanded="false"
                                        id="class_resource">班级资源</a></li>
                        <li class=""><a data-toggle="tab" href="#tab-3" aria-expanded="false"
                                        id="class_question">班级问题</a></li>
                        <li class=""><a data-toggle="tab" href="#tab-4" aria-expanded="false" id="homework_correcting">批改作业</a>
                        </li>
                        <li class=""><a data-toggle="tab" href="#tab-5" aria-expanded="false" id="student_evaluation">学生评价</a>
                        </li>
                        <li class=""><a data-toggle="tab" href="#tab-6" aria-expanded="false"
                                        id="ask_for_leave">请假处理</a></li>
                        <li class=""><a data-toggle="tab" href="#tab-7" aria-expanded="false" id="disciplinary_process">违纪处理</a>
                        </li>
                    </ul>
                    <div class="tab-content">
                        <div id="tab-1" class="tab-pane active">
                            <div class="panel-body">
                                <h4 class="heading lead" style="margin-top: 20px">
                                    班级介绍
                                    <div style="background-color:#1a7bb9;height: 4px;width: 90px"></div>
                                    <hr style="margin-top: 0;margin-bottom: 20px">
                                    <div class="ibox">
                                        <h5 class="lead">
                                            JavaEE企业级开发
                                        </h5>
                                    </div>
                                </h4>
                                <h4 class="heading lead" style="margin-top: 100px">
                                    班级课程
                                    <div style="background-color:#1a7bb9;height: 4px;width: 90px"></div>
                                    <hr style="margin-top: 0;margin-bottom: 20px">
                                    <div class="col-md-2 text-center" id="box"
                                         onclick="javascript:location.href='courseDetails.html'"
                                         style="cursor:pointer;">
                                        <ul>
                                            <li style="margin-top: 40px;border-bottom-width: 0;border-bottom-style: solid;margin-bottom:100px;">
                                                <img src="../../static/public/teaching/img/getImage_002.png"
                                                     alt="Java核心技术(一)"/>
                                                <a href="#">JavaScript<br/><span>Java核心技术(一)</span></a>
                                                <span class="bg"></span>
                                            </li>
                                        </ul>
                                    </div>
                                </h4>
                            </div>
                        </div>
                        <!--班级资源-->
                        <div id="tab-2" class="tab-pane">
                            <div class="panel-body">
                                <h4 class="heading lead" style="margin-top: 20px">
                                    班级资源
                                    <div style="background-color:#1a7bb9;height: 4px;width: 90px"></div>
                                    <hr style="margin-top: 0;margin-bottom: 20px">
                                </h4>
                                <form class="form-inline" style="margin: 20px 0 20px 0">
                                    <div class="form-group">
                                        <label style="font-size: 16px" class="lead">资源名称:</label>
                                        <input type="text" name="resourceName" class="form-control"
                                               style="border-radius: 5px;"
                                               id="exampleInputUserName2">
                                    </div>
                                    <button type="submit" class="btn btn-success input_margin"
                                            style="padding-bottom: 7px;margin-bottom: 13px;">查询
                                    </button>
                                    <div class="ibox-tools">
                                        <button type="button" class="btn btn-danger delete_list">删除</button>
                                    </div>
                                </form>
                                <table id="tb_departments_2"></table>
                            </div>
                        </div>
                        <!--班级问题-->
                        <div id="tab-3" class="tab-pane">
                            <div class="panel-body">
                                <h4 class="heading lead" style="margin-top: 20px">
                                    班级问答
                                    <div style="background-color:#1a7bb9 ;height: 4px;width: 90px"></div>
                                    <hr style="margin-top: 0;margin-bottom: 20px">
                                </h4>
                                <table id="tb_departments_3"></table>
                            </div>
                        </div>
                        <!--批改作业-->
                        <div id="tab-4" class="tab-pane">
                            <div class="panel-body">
                                <table id="tb_departments_4"></table>
                            </div>
                        </div>
                        <!--学生评价-->
                        <div id="tab-5" class="tab-pane">
                            <div class="panel-body">
                                <table id="tb_departments_5"></table>
                            </div>
                        </div>
                        <!--请假处理-->
                        <div id="tab-6" class="tab-pane">
                            <div class="panel-body">
                                <table id="tb_departments_6"></table>
                            </div>
                        </div>
                        <!--违纪处理-->
                        <div id="tab-7" class="tab-pane">
                            <div class="ibox-content" style="padding-left: 0;">
                                <form class="form-inline" style="margin:15px 5px;">
                                    <div class="pull-left" style="margin-bottom: 50px">
                                        <div class="form-group">
                                            <label>学号:</label>
                                            <div class="input-group">
                                                <input type="text" class="form-control" style="border-radius: 5px;"
                                                       id="class_num" name="classNum">
                                            </div>
                                        </div>
                                        <div class="form-group input_margin">
                                            <label>姓名:</label>
                                            <div class="input-group">
                                                <input type="text" class="form-control" id="major_name"
                                                       style="border-radius: 5px;" name="stuName">
                                            </div>
                                        </div>
                                        <div class="form-group input_margin">
                                            <label>开始时间:</label>
                                            <div class="input-group">
                                                <input class="form-control layer-date" id="start"
                                                       style="border-radius: 5px;" name="startTime">
                                            </div>
                                        </div>
                                        <div class="form-group input_margin">
                                            <label>结束时间:</label>
                                            <div class="input-group">
                                                <input class="form-control layer-date" id="end"
                                                       style="border-radius: 5px;" name="endTime">
                                            </div>
                                        </div>
                                        <input type="submit" class="btn btn-success input_margin"
                                               style="display: inline ;margin-top: 3px; border-radius: 5px;"
                                               value="查询"
                                               id="queryBtn"/>
                                    </div>
                                    <div class="pull-right">
                                        <div class="form-group">
                                            <input type="button" class="btn btn-success"
                                                   style="display: inline ;margin-top: 3px; border-radius: 5px;"
                                                   value="添加" data-toggle="modal" data-target="#add"
                                                   id="addBtn"/>
                                        </div>
                                    </div>
                                </form>
                                <table id="tb_departments_7"></table>
                            </div>
                        </div>
                    </div>
                </div>
                <!--添加违纪记录模态框-->
                <div class="modal fade" id="add" tabindex="-1">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <span class="close" data-dismiss="modal">&times;</span>
                                <h3 class="modal-title">添加违约记录</h3>
                            </div>

                            <div class="modal-body" style="min-height: 300px;margin-top: 20px">
                                <form action="#" class="form-horizontal" method="post">
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label right">违规学生：</label>
                                        <div class="col-sm-7">
                                            <div class="input-group">
                                                <input type="text" class="form-control org" name="stuName">
                                                <div class="input-group-btn" style="z-index:99999!important;">
                                                    <button type="button" class="btn btn-white dropdown-toggle"
                                                            data-toggle="dropdown">
                                                        <span class="caret"></span>
                                                    </button>
                                                    <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                                    </ul>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label right ">违规时间：</label>
                                        <div class="col-sm-7">
                                            <input type="text" class="form-control" id="bad_time" name="violatorTime">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label right">附件说明：</label>
                                        <div class="col-sm-7">
                                            <div id="file-pretty">
                                                <input type="file" multiple="multiple" class="form-control"
                                                       name="attachmentShows">
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label right">说明情况：</label>
                                        <div class="col-sm-7">
                                            <textarea class="form-control" type="text" name="illustrate"></textarea>
                                        </div>
                                    </div>
                                </form>
                            </div>
                            <div class="modal-footer">
                                <button class="btn btn-success" data-dismiss="modal">关闭</button>
                                <button class="btn btn-success" id="add_sure">确定</button>
                            </div>
                        </div>
                    </div>
                </div>
                <!--班级问答模态框-->
                <div class="modal fade" id="qa" tabindex="-1">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <span class="close" data-dismiss="modal">&times;</span>
                                <h3 class="modal-title">解答</h3>
                            </div>
                            <form class="form-horizontal">
                                <div class="modal-body">
                                    <div class="chat-activity-list">
                                        <div class="chat-element">
                                            <a href="#" class="pull-left">
                                                <img alt="image" class="img-circle" src="../../static/img/a2.jpg">
                                            </a>
                                            <div class="media-body">
                                                <strong class="student">韩梅梅[学生]</strong>
                                                <p class="m-b-xs">
                                                    循环有点不太明白
                                                </p>
                                                <small class="text-muted">2020-06-12 00:00:00</small>
                                            </div>
                                        </div>
                                        <div class="chat-element right">
                                            <a href="#" class="pull-right">
                                                <img alt="image" class="img-circle" src="../../static/img/a4.jpg">
                                            </a>
                                            <div class="media-body text-right ">
                                                <strong class="admin">admin </strong>
                                                <p class="m-b-xs">
                                                    多看视频
                                                </p>
                                                <small class="text-muted">2020-06-12 15:04:23</small>
                                            </div>
                                        </div>
                                    </div>
                                    <h2 style="margin-top: 20px;"><strong>我要回答</strong></h2>
                                    <textarea id="editor" autofocus></textarea>
                                </div>
                            </form>

                            <div class="modal-footer">
                                <button class="btn btn-success" data-dismiss="modal">关闭</button>
                                <button class="btn btn-success">确定</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!--模态框-->
<!--批改作业-->
<div class="modal fade" id="checkwork" tabindex="-1">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <span class="close" data-dismiss="modal">&times;</span>
                <h3 class="modal-title">批改作业</h3>
            </div>

            <div class="modal-body" style="min-height: 400px;margin-top: 20px">
                <form action="#" class="form-horizontal" method="post">
                    <div class="form-group">
                        <label class="col-sm-3 control-label right ">作业标题：</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control" placeholder="" id="work_title"
                                   disabled>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label right ">作业内容：</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control" placeholder=""
                                   id="work_content" disabled>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label right ">布置时间：</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control" placeholder="" id="start_time"
                                   disabled>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label right ">作业附件：</label>
                        <div class="col-sm-7">
                            <a href="../../static/img/a1.jpg" download="文件下载"><i
                                    class="fa fa-download"></i></a>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label right ">学生姓名：</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control" placeholder="韩梅梅" id="stu_name"
                                   disabled>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label right ">写作时间：</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control" placeholder="2020-06-12 15:01:15"
                                   id="work_time"
                                   disabled>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label right ">写作内容：</label>
                        <div class="col-sm-7">
                                            <textarea type="text" class="form-control"
                                                      placeholder="<p>老师,太难了,我不会写<br/></p>" id="writing_content"
                                                      disabled></textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label right ">写作附件：</label>
                        <div class="col-sm-7">
                            <a href="../../static/img/a1.jpg" download="文件下载"><i
                                    class="fa fa-download"></i></a>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label right ">审批内容：</label>
                        <div class="col-sm-7">
                            <textarea type="text" class="form-control" id="check_content"></textarea>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button class="btn btn-success" data-dismiss="modal">关闭</button>
                <button class="btn btn-success">确定</button>
            </div>
        </div>
    </div>
</div>
<!--学生评价-->
<div class="modal fade" id="assessment" tabindex="-1">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <span class="close" data-dismiss="modal">&times;</span>
                <h3 class="modal-title">评价</h3>
            </div>
            <div class="modal-body" style="margin-top: 20px">
                <form action="#" class="form-horizontal" method="post">
                    <div class="form-group">
                        <label class="col-sm-3 control-label right ">学生姓名：</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control stu_name" placeholder="韩梅梅" disabled>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label right ">评价内容：</label>
                        <div class="col-sm-7">
                            <textarea type="text" class="form-control"></textarea>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button class="btn btn-success" data-dismiss="modal">关闭</button>
                <button class="btn btn-success">确定</button>
            </div>
        </div>
    </div>
</div>
<!--请假处理-->
<div class="modal fade" id="leave" tabindex="-1">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <span class="close" data-dismiss="modal">&times;</span>
                <h3 class="modal-title">提示</h3>
            </div>
            <div class="modal-body" style="margin-top: 20px">
                <form action="#" class="form-horizontal" method="post">
                    <div class="form-group">
                        <label class="col-sm-3 control-label right ">是否需要通过审批</label>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button class="btn btn-success" data-dismiss="modal">关闭</button>
                <button class="btn btn-success">确定</button>
            </div>
        </div>
    </div>
</div>
<div class="modal fade" id="no_leave" tabindex="-1">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <span class="close" data-dismiss="modal">&times;</span>
                <h3 class="modal-title">提示</h3>
            </div>
            <div class="modal-body" style="margin-top: 20px">
                <form action="#" class="form-horizontal" method="post">
                    <div class="form-group">
                        <label class="col-sm-3 control-label right ">是否需要拒绝审批</label>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button class="btn btn-success" data-dismiss="modal">关闭</button>
                <button class="btn btn-success">确定</button>
            </div>
        </div>
    </div>
</div>
</body>
<!-- 全局js -->
<script src="../../static/js/jquery.min.js?v=2.1.4" th:href="@{/static/js/jquery.min.js}"></script>
<script src="../../static/js/bootstrap.min.js?v=3.3.6" th:href="@{/static/js/bootstrap.min.js}"></script>
<!-- 自定义js -->
<script src="../../static/js/content.js?v=1.0.0" th:href="@{/static/js/content.js}"></script>
<!-- Bootstrap table -->
<script src="../../static/js/plugins/bootstrap-table/bootstrap-table.min.js"
        th:href="@{/static/js/plugins/bootstrap-table/bootstrap-table.min.js}"></script>
<script src="../../static/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"
        th:href="@{/static/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js}"></script>
<script src="../../static/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"
        th:href="@{/static/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js}"></script>
<!--动态搜索-->
<script src="../../static/js/plugins/suggest/bootstrap-suggest.min.js"
        th:href="@{/static/js/plugins/suggest/bootstrap-suggest.min.js}"></script>
<!--图书封面效果-->
<script src="../../static/js/plugins/move/move.js" th:href="@{/static/js/plugins/move/move.js}"></script>
<!-- layerDate plugin javascript -->
<script src="../../static/js/plugins/layer/laydate/laydate.js"
        th:href="@{/static/js/plugins/layer/laydate/laydate.js}"></script>
<!-- Sweet alert -->
<script src="../../static/js/plugins/sweetalert/sweetalert.min.js"
        th:href="@{/static/js/plugins/sweetalert/sweetalert.min.js}"></script>
<!-- simditor -->
<script type="text/javascript" src="../../static/js/plugins/simditor/module.js"
        th:href="@{/static/js/plugins/simditor/module.js}"></script>
<script type="text/javascript" src="../../static/js/plugins/simditor/uploader.js"
        th:href="@{/static/js/plugins/simditor/uploader.js}"></script>
<script type="text/javascript" src="../../static/js/plugins/simditor/hotkeys.js"
        th:href="@{/static/js/plugins/simditor/hotkeys.js}"></script>
<script type="text/javascript" src="../../static/js/plugins/simditor/simditor.js"
        th:href="@{/static/js/plugins/simditor/simditor.js}"></script>
<!-- Prettyfile -->
<script src="../../static/js/plugins/prettyfile/bootstrap-prettyfile.js"
        th:href="@{/static/js/plugins/prettyfile/bootstrap-prettyfile.js}"></script>
<!--日期选择-->
<script>
    //日期范围限制
    var start = {
        elem: '#start',
        format: 'YYYY-MM-DD hh:mm:ss',
        min: laydate.now(), //设定最小日期为当前日期
        max: '2099-06-16 23:59:59', //最大日期
        istime: true,
        istoday: false,
        choose: function (datas) {
            end.min = datas; //开始日选好后，重置结束日的最小日期
            end.start = datas //将结束日的初始值设定为开始日
        }
    };
    var end = {
        elem: '#end',
        format: 'YYYY-MM-DD hh:mm:ss',
        min: laydate.now(),
        max: '2099-06-16 23:59:59',
        istime: true,
        istoday: false,
        choose: function (datas) {
            start.max = datas; //结束日选好后，重置开始日的最大日期
        }
    };
    var bad_time = {
        elem: '#bad_time',
        format: 'YYYY-MM-DD hh:mm:ss',
        min: laydate.now(),
        max: '2099-06-16 23:59:59',
        istime: true,
        istoday: false,
        choose: function (datas) {
            start.max = datas; //结束日选好后，重置开始日的最大日期
        }
    };
    laydate(start);
    laydate(end);
    laydate(bad_time);

    /*文件上传*/
    $('#file-pretty input[type="file"]').prettyFile();

    /*班级资源删除按钮*/
    $('.delete_list').click(function () {
        var selectList = $('#tb_departments_2').bootstrapTable('getAllSelections'); //获得选中
        if (selectList.length === 0 || selectList === "") {
            swal({
                title: "提示",
                text: "至少选择一行",
                type: "warning",
                closeOnConfirm: true, //关闭
            });
            return false;
        }
        let ids = [];
        for (let i = 0; i < selectList.length; i++) {
            //获取选中行的id
            ids.push(selectList[i].id);
        }
        swal({
            title: "提示",
            text: "你确定要删除这" + ids.length + "记录吗?请谨慎操作!",
            type: "warning",
            showCancelButton: true,
            cancelButtonText: '取消',
            confirmButtonColor: "#DD6B55",
            confirmButtonText: "删除",
            closeOnConfirm: false, //关闭
        }, function () {
            //TODO AJAX请求
            swal("删除成功!", "您已经永久删除.", "success");
        })
    })
</script>
<script>
    $(function () {
        //1.初始化Table
        var oTable = new TableInit();
        oTable.Init();
        //2.初始化Button的点击事件
        var oButtonInit = new ButtonInit();
        oButtonInit.Init();
    });

    var TableInit = function () {
        var oTableInit = new Object();
        //初始化Table
        oTableInit.Init = function () {
            //班级资源
            $('#tb_departments_2').bootstrapTable({
                // url: '../../static/js/demo/user/adminListTest.json',       //请求后台的URL（*）
                data: [
                    {
                        "id": "1",
                        "resource_name": "2020061101",
                        "resource_type": "JAVA开发工程师",
                        "resource_size": "开发部",
                    },
                    {
                        "id": "2",
                        "resource_name": "2020061102",
                        "resource_type": "JAVA开发工程师",
                        "resource_size": "开发部",
                    }],
                // method: 'get',                      //请求方式（*）
                striped:
                    true,                      //是否显示行间隔色
                pagination:
                    true,                   //是否显示分页（*）
                queryParams:
                oTableInit.queryParams,//传递参数（*）
                pageNumber:
                    1,                       //初始化加载第一页，默认第一页
                pageSize:
                    10,                       //每页的记录行数（*）
                pageList:
                    [10, 25, 50, 100],        //可供选择的每页的行数（*）
                uniqueId:
                    "ID",                     //每一行的唯一标识，一般为主键列
                columns:
                    [{
                        checkbox: true
                    }, {
                        field: 'id',
                        title: 'id',
                        visible: false //隐藏
                    }, {
                        field: 'resource_name',
                        title: '资源名称'
                    }, {
                        field: 'resource_type',
                        title: '资源类型'
                    }, {
                        field: 'resource_size',
                        title: '资源大小(kb)'
                    }, {
                        field: 'operate',
                        title: '操作',
                        width: 100,
                        events: {
                            'click button[title=删除]': function (e, value, row, index) {
                                console.log(row.resource_name);
                                swal({
                                    title: "您确定要删除这条信息吗",
                                    text: "删除后将无法恢复，请谨慎操作！",
                                    type: "warning",
                                    cancelButtonText: '取消',
                                    showCancelButton: true,
                                    confirmButtonColor: "#DD6B55",
                                    confirmButtonText: "删除",
                                    closeOnConfirm: false
                                }, function () {
                                    //TODO 发送ajax请求
                                    swal("删除成功！", "您已经永久删除了这条信息。", "success");
                                });
                            }
                        },
                        formatter: function (value, row, index) {
                            return ['<button id = "" type = "button" class = "btn btn-white" title="无此权限" data-toggle="tooltip" data-placement="top" disabled > <i class="fa fa-cloud-download"/> </button>' +
                            '<button id = "" type = "button" class = "btn  btn-white" data-toggle="tooltip" data-placement="top" title="删除" > <i class="glyphicon glyphicon-trash text-danger"/> </button>'].join("");//删除
                        }
                    }]
            });
        };

        //班级问题
        $('#tb_departments_3').bootstrapTable({
            // url: '../../static/js/demo/user/adminListTest.json',       //请求后台的URL（*）
            data: [
                {
                    "serial_number": "1",
                    "problem": "循环不太明白",
                    "correlated_curriculum": "JAVA基础编程",
                    "question_time": "2020-06-12 00:00:01",
                    "questioner": "韩梅梅",
                    "responder": "admin1",
                    "answer_content": "多看视频",
                    "answer_time": "2020-06-12 15:04:21",
                },
                {
                    "serial_number": "2",
                    "problem": "这是一个COREJAVA的问题",
                    "correlated_curriculum": "JAVA基础编程",
                    "question_time": "2020-06-12 00:00:02",
                    "questioner": "李雷",
                    "responder": "admin2",
                    "answer_content": "多跟着视频敲",
                    "answer_time": "2020-06-12 15:04:22",
                },
                {
                    "serial_number": "3",
                    "problem": "这是一个集合问题",
                    "correlated_curriculum": "JAVA基础编程",
                    "question_time": "2020-06-12 00:00:03",
                    "questioner": "李韩",
                    "responder": "admin3",
                    "answer_content": "细细品",
                    "answer_time": "2020-06-12 15:04:23",
                }],
            // method: 'get',                      //请求方式（*）
            striped:
                true,                      //是否显示行间隔色
            pagination:
                true,                   //是否显示分页（*）
            queryParams:
            oTableInit.queryParams,//传递参数（*）
            pageNumber:
                1,                       //初始化加载第一页，默认第一页
            pageSize:
                10,                       //每页的记录行数（*）
            pageList:
                [10, 25, 50, 100],        //可供选择的每页的行数（*）
            /*      height:
                      500,   */                     //行高，如果没有设置height属性，表格自动根据记录条数觉得表格高度
            uniqueId:
                "ID",                     //每一行的唯一标识，一般为主键列
            columns:
                [{
                    field: 'serial_number',
                    title: '序号'
                }, {
                    field: 'problem',
                    title: '问题描述'
                }, {
                    field: 'correlated_curriculum',
                    title: '相关课程'
                }, {
                    field: 'question_time',
                    title: '提问时间'
                }, {
                    field: 'questioner',
                    title: '提问人',
                }, {
                    field: 'responder',
                    title: '回答者',
                    visible: false
                }, {
                    field: 'answer_content',
                    title: '回答内容',
                    visible: false
                }, {
                    field: 'answer_time',
                    title: '回答时间',
                    visible: false
                }, {
                    field: 'operate',
                    title: '操作',
                    width: 150,
                    events: {
                        /*回显数据*/
                        "click #message": function (e, value, row, index) {
                            $('#qa').modal();

                            $("strong.student").text(row.questioner + "[学生]");
                            $("strong.admin").text(row.responder + "[老师]");
                            $("p:first").text(row.problem);
                            $("p").eq(1).text(row.answer_content);
                            $("small.text-muted").eq(0).text(row.question_time);
                            $("small.text-muted").eq(1).text(row.answer_time);
                        },
                        "click #delete_row": function (e, value, row, index) {
                            console.log(row.serial_number);
                            swal({
                                title: "您确定要删除这条信息吗",
                                text: "删除后将无法恢复，请谨慎操作！",
                                type: "warning",
                                showCancelButton: true,
                                cancelButtonText: '取消',
                                confirmButtonColor: "#DD6B55",
                                confirmButtonText: "删除",
                                closeOnConfirm: false
                            }, function () {
                                //TODO 发送ajax请求
                                swal("删除成功！", "您已经永久删除了这条信息。", "success");
                            });
                        }
                    },
                    formatter: function (value, row, index) {
                        return ['<button id = "message" btn_click="1" type = "button" class = "btn btn-white" title="详情" data-toggle="tooltip" data-placement="top"  > <i class="fa fa-road"/> </button>' +
                        '<button id = "delete_row" type = "button" class = "btn  btn-white" data-toggle="tooltip" data-placement="top" title="删除" > <i class="glyphicon glyphicon-trash text-danger"/> </button>'];//删除
                    },

                }]
        });

        //批改作业
        $('#tb_departments_4').bootstrapTable({
            // url: '../../static/js/demo/user/adminListTest.json',       //请求后台的URL（*）
            data: [
                {
                    "id": "1",
                    "job_title": "完成课题案例",
                    "job_content": "完成课题案例",
                    "arrangement_time": "2020-06-12 15:01:15",
                    "students_answer": "老师,太难了,我不会写",
                    "students_name": "韩梅梅",
                    "reoperate_time": "2020-06-16 18:31:04",
                }, {
                    "id": "2",
                    "job_title": "完成课题案例",
                    "job_content": "完成课题练习",
                    "arrangement_time": "2020-06-15 12:00:00",
                    "students_answer": "没有思路",
                    "students_name": "韩梅梅",
                    "reoperate_time": "2020-06-18 20:00:00",
                }, {
                    "id": "3",
                    "job_title": "完成周末小练习",
                    "job_content": "可变长数组",
                    "arrangement_time": "2020-06-18 18:00:00",
                    "students_answer": "哪有可变长的数组",
                    "students_name": "韩梅梅",
                    "reoperate_time": "2020-06-20 18:31:04",
                },
            ],
            // method: 'get',                      //请求方式（*）
            striped:
                true,                      //是否显示行间隔色
            pagination:
                true,                   //是否显示分页（*）
            queryParams:
            oTableInit.queryParams,//传递参数（*）
            pageNumber:
                1,                       //初始化加载第一页，默认第一页
            pageSize:
                10,                       //每页的记录行数（*）
            pageList:
                [10, 25, 50, 100],        //可供选择的每页的行数（*）
            /*      height:
                      500,   */                     //行高，如果没有设置height属性，表格自动根据记录条数觉得表格高度
            uniqueId:
                "ID",                     //每一行的唯一标识，一般为主键列
            columns:
                [{
                    field: "id",
                    title: "id",
                    visible: false //隐藏
                }, {
                    field: 'job_title',
                    title: '作业标题'
                }, {
                    field: 'job_content',
                    title: '作业内容'
                }, {
                    field: 'arrangement_time',
                    title: '布置时间',
                    visible: false //隐藏
                }, {
                    field: 'students_answer',
                    title: '学生答案'
                }, {
                    field: 'students_name',
                    title: '学生姓名'
                }, {
                    field: 'reoperate_time',
                    title: '写作时间'
                }, {
                    field: 'operate',
                    title: '操作',
                    width: 150,
                    events: {
                        "click #check_work": function (e, value, row, index) {
                            $('#checkwork').modal();
                            /*回显数据*/
                            $('#work_title').val(row.job_title);
                            $('#work_content').val(row.job_content);
                            $('#start_time').val(row.arrangement_time);
                            $('#stu_name').val(row.student_name);
                            $('#work_time').val(row.reoperate_time);
                            $('#writing_content').val(row.job_title);
                        },
                    },
                    formatter: function (value, row, index) {
                        return '<button id = "check_work" type = "button" class = "btn btn-white" title="详情" data-toggle="tooltip" data-placement="top"  > <i class="fa fa-edit"/> </button>';
                    }
                }]
        });

        //学生评价
        $('#tb_departments_5').bootstrapTable({
            // url: '../../static/js/demo/user/adminListTest.json',       //请求后台的URL（*）
            data: [
                {
                    "id": "1",
                    "student_number": "zbstu180817000001",
                    "student_name": "韩梅梅",
                    "gender": "女",
                    "phone": "18694939527",
                    "email": "62375405@qq.com",
                    "effective_date": "2020-08-17",
                    "effective_status": "启用",
                }, {
                    "id": "2",
                    "student_number": "zbstu180817000002",
                    "student_name": "李雷",
                    "gender": "男",
                    "phone": "1778899102",
                    "email": "9561547875@qq.com",
                    "effective_date": "2020-08-17",
                    "effective_status": "启用",
                }],
            // method: 'get',                      //请求方式（*）
            striped:
                true,                      //是否显示行间隔色
            pagination:
                true,                   //是否显示分页（*）
            queryParams:
            oTableInit.queryParams,//传递参数（*）
            pageNumber:
                1,                       //初始化加载第一页，默认第一页
            pageSize:
                10,                       //每页的记录行数（*）
            pageList:
                [10, 25, 50, 100],        //可供选择的每页的行数（*）
            uniqueId:
                "ID",                     //每一行的唯一标识，一般为主键列
            columns:
                [{
                    checkbox: true
                }, {
                    field: "id",
                    title: "id",
                    visible: false //隐藏
                }, {
                    field: 'student_number',
                    title: '学号'
                }, {
                    field: 'student_name',
                    title: '姓名'
                }, {
                    field: 'gender',
                    title: '性别'
                }, {
                    field: 'phone',
                    title: '手机'
                }, {
                    field: 'email',
                    title: '邮箱'
                }, {
                    field: 'effective_date',
                    title: '有效日期'
                }, {
                    field: 'effective_status',
                    title: '状态'
                }, {
                    field: 'evaluate',
                    title: '评价',
                    width: 150,
                    events: {
                        "click #evaluation": function (e, value, row, index) {
                            $('#assessment').modal();
                            /*回显数据*/
                            $('.stu_name').val(row.student_name);
                        }
                    },
                    formatter: function (value, row, index) {
                        return '<button id = "evaluation" type = "button" class = "btn btn-white" title="详情" data-toggle="tooltip" data-placement="top" > <i class="fa fa-edit"/> </button>';
                    }
                }]
        });

        //请假处理
        $('#tb_departments_6').bootstrapTable({
            // url: '../../static/js/demo/user/adminListTest.json',       //请求后台的URL（*）
            data: [
                {
                    "serial_number": "1",
                    "leave_time": "韩梅梅",
                    "end_time": "2020-06-16 00:00:00",
                    "student_name": "2020-06-16 23:59:00",
                    "reason_leave": "<strong>我病了</strong>",
                    "approval_status": "已通过",
                }],
            // method: 'get',                      //请求方式（*）
            striped:
                true,                      //是否显示行间隔色
            pagination:
                true,                   //是否显示分页（*）
            queryParams:
            oTableInit.queryParams,//传递参数（*）
            pageNumber:
                1,                       //初始化加载第一页，默认第一页
            pageSize:
                10,                       //每页的记录行数（*）
            pageList:
                [10, 25, 50, 100],        //可供选择的每页的行数（*）
            uniqueId:
                "ID",                     //每一行的唯一标识，一般为主键列
            columns:
                [{
                    field: 'serial_number',
                    title: '序号'
                }, {
                    field: 'leave_time',
                    title: '请假时间'
                }, {
                    field: 'end_time',
                    title: '结束时间'
                }, {
                    field: 'student_name',
                    title: '学生姓名'
                }, {
                    field: 'reason_leave',
                    title: '请假事由'
                }, {
                    field: 'approval_status',
                    title: '审批状态'
                }, {
                    field: 'operate',
                    title: '操作',
                    width: 150,
                    formatter: function (value, row, index) {
                        return ['<button id = "" type = "button" class = " btn btn-white" title="通过审查"  data-toggle="modal"  data-toggle="tooltip" data-placement="top"  data-target="#leave"> <i class="glyphicon glyphicon-ok"/> </button>' +
                        '<button id = "" type = "button" class = "btn  btn-white" data-toggle="modal" data-toggle="tooltip" data-placement="top" title="拒绝审查" data-target="#no_leave"> <i class="glyphicon glyphicon-remove text-danger"/> </button>'];//删除
                    }
                }]
        });

        //违纪问题
        $('#tb_departments_7').bootstrapTable({
            // url: '../../static/js/demo/user/adminListTest.json',       //请求后台的URL（*）
            data: [
                {
                    "student_number": "stu110",
                    "student_name": "韩梅梅",
                    "discipline_time": "2020-06-17 00:00:00",
                    "presentation_condition": "偷懒",
                }
            ],
            // method: 'get',                      //请求方式（*）
            striped:
                true,                      //是否显示行间隔色
            pagination:
                true,                   //是否显示分页（*）
            queryParams:
            oTableInit.queryParams,//传递参数（*）
            pageNumber:
                1,                       //初始化加载第一页，默认第一页
            pageSize:
                10,                       //每页的记录行数（*）
            pageList:
                [10, 25, 50, 100],        //可供选择的每页的行数（*）
            uniqueId:
                "ID",                     //每一行的唯一标识，一般为主键列
            columns:
                [{
                    field: 'student_number',
                    title: '学号'
                }, {
                    field: 'student_name',
                    title: '姓名'
                }, {
                    field: 'discipline_time',
                    title: '违纪时间'
                }, {
                    field: 'presentation_condition',
                    title: '情况说明'
                }, {
                    field: 'operate',
                    title: '操作',
                    width: 150,
                    events: {
                        "click #leave_btn": function (e, value, row, index) {
                            swal({
                                title: "您确定要删除这条信息吗",
                                text: "删除后将无法恢复，请谨慎操作！",
                                type: "warning",
                                showCancelButton: true,
                                cancelButtonText: '取消',
                                confirmButtonColor: "#DD6B55",
                                confirmButtonText: "删除",
                                closeOnConfirm: false
                            }, function () {
                                //TODO 发送ajax请求
                                swal("删除成功！", "您已经永久删除了这条信息。", "success");
                            });
                        }
                    },
                    formatter: function (value, row, index) {
                        return ['<button id = "" type = "button" class = "btn btn-white" title="无此权限" data-toggle="tooltip" data-placement="top" disabled > <i class="fa fa-cloud-download"/> </button>' +
                        '<button id = "leave_btn" type = "button" class = "btn  btn-white" data-toggle="tooltip" data-placement="top" title="删除" > <i class="glyphicon glyphicon-trash text-danger"/> </button>'];//删除
                    }
                }],

        });

        //鼠标悬停提示
        $(function () {
            $('[data-toggle="tooltip"]').tooltip()
        });
        $(function () {
            $('#message').tooltip()
        });

        //得到查询的参数
        oTableInit.queryParams = function (params) {
            var temp = {   //这里的键的名字和控制器的变量名必须一直，这边改动，控制器也需要改成一样的
                limit: params.limit,   //页面大小
                offset: params.offset,  //页码
                departmentname: $("#txt_search_departmentname").val(),
                statu: $("#txt_search_statu").val()
            };
            return temp;
        };
        return oTableInit;
    };
    var ButtonInit = function () {
        var oInit = new Object();
        var postdata = {};
        oInit.Init = function () {
        };

        return oInit;
    };

    //自动补齐违规学生
    $(".org").bsSuggest({
        indexId: 0, //data.value 的第几个数据，作为input输入框的内容
        indexKey: 0, //data.value 的第几个数据，作为input输入框的内容
        //TODO 通过json显示数据
        data: {
            'value': [
                {
                    'name': "韩梅梅",
                    'student_number': "stu110",
                },
                {
                    'name': "李雷",
                    'student_number': 'stu119',
                }
            ]
        }
    });

</script>
<!--班级问题富文本框-->
<script>
    var editor = new Simditor({
        textarea: $('#editor')
    });
    /*清除样式*/
    $(".simditor-toolbar").removeAttr("style"); //ie,ff均支持
</script>
</html>